<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var aaa="爱心超市.png"
    console.log(aaa.endsWith('.png'));

    var Aaa={name:"爱心超市.png",name1:"爱心超市.jpg"}
    console.log(Aaa.name1.endsWith('.png'));
</script>
</html>